﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp2.Score
{
    public partial class EditScore : Form
    {
        public EditScore()
        {
            InitializeComponent();
        }

        public ListViewItem m_lv { get; set; }
        private void EditScore_Load(object sender, EventArgs e)
        {
            if (m_lv != null)
            {
                if (m_lv.SubItems.Count == 0)
                {
                    m_lv.SubItems.Add("3");
                }
                else
                {
                    numericUpDown1.Value = int.Parse(m_lv.SubItems[1].Text);
                }

                lbl_no.Text = m_lv.Text;
            }

            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            m_lv.SubItems[1].Text = numericUpDown1.Value.ToString();

            DialogResult = DialogResult.OK;
        }
    }
}
